package com.zxjbyte.yiyi.module.plugin.job.api;

import com.zxjbyte.yiyi.framework.common.constant.Constant;
import com.zxjbyte.yiyi.module.plugin.job.domain.dto.JobLogAddDTO;
import com.zxjbyte.yiyi.module.plugin.job.service.IJobLogService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author zhangxingjia
 * @Date 2024/1/3 14:21
 * @Version: 1.0
 */
@Service
public class JobLogApiImpl implements JobLogApi {

    @Resource
    private IJobLogService jobLogService;

    @Override
    @Async(Constant.DEFAULT_THREAD_POOL)
    public void asyncAddLog(JobLogAddDTO addDto) {
        jobLogService.addLog(addDto);
    }
}
